import request from '@/utils/request'

// 获取部门接口
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}
// 删除部门接口
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 新增部门
export const addDepartments = data => request({
  url: '/company/department',
  method: 'POST',
  data
})
// 根据Id获取部门详情
export const getUserInfoById = id => request({
  url: `/company/department/${id}`
})
// 编辑部门
export const updateDeaprtInfo = data => request({
  url: `/company/department/${data.id}`,
  method: 'PUT',
  data
})
